package org.iks.store.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.iks.common.pojo.store.SecretKeyVo;
import org.iks.store.business.entity.SessionEncipherEntity;
import org.iks.store.business.vo.secret.SecretCreateVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Author kzou
 * Date 2024/2/20
 * Description:
 */
public interface SessionEncipherService extends IService<SessionEncipherEntity> {

    SecretKeyVo queryLatestSecretKey(String userAccount, Integer sessionId);

    @Transactional(rollbackFor = Exception.class)
    int createSecretKey(String userAccount, SecretCreateVo secretCreateVo);

    SessionEncipherEntity queryLatestVersionSecretKey(Integer sessionId);

    SecretKeyVo queryByVersion(Integer sessionId,Integer version,String userAccount);

    List<SecretKeyVo> queryListSecretKey(Integer sessionId);

    SecretKeyVo queryById(Integer secretKeyId);
}
